<template>
  <div>
    <el-container style="border: 1px solid #eee">
      <img src="../assets/headlogo.png" class="imglogo" alt="" />
      <!-- 头部 -->
      <el-header style="text-align: right; font-size: 18px ;color: white">
        <span><i class="el-icon-user"></i>{{name}}</span>
        <el-button type="info" icon="el-icon-close" @click="fanhui" circle></el-button>
      </el-header>
      <!-- 头部结束 -->
      <el-container>
        <!-- 左例表 -->
        <el-aside width=130>
          <!-- 成员 -->
          <el-menu :default-openeds="['1', '3']">
            <el-submenu index="1">
              <template slot="title"><i class="el-icon-user"></i>成员管理</template>
              <el-menu-item-group>
                <router-link to="/main/byxz"><el-menu-item index="1-1">榜样学子</el-menu-item></router-link>
                <router-link to="/main/cyb"><el-menu-item index="1-2">成员表</el-menu-item></router-link>
                <router-link to="/main/zjb"><el-menu-item index="1-3">专家表</el-menu-item></router-link>
              </el-menu-item-group>
            </el-submenu>
            <!-- 项目 -->
            <el-submenu index="2">
              <template slot="title">
                <i class="el-icon-menu"></i>项目管理
              </template>
              <el-submenu index="2-1">
                <template slot="title">项目表</template>
                <router-link to="/main/xmb"><el-menu-item index="2-1-1">项目表全</el-menu-item></router-link>
                <router-link to="/main/xmb6"><el-menu-item index="2-1-2">项目表前6+</el-menu-item></router-link>
              </el-submenu>
              <el-submenu index="2-2">
                <template slot="title">其他表</template>
                <el-menu-item index="2-2-1">其他表全</el-menu-item
                ><el-menu-item index="2-2-2">其他表前6+</el-menu-item>
              </el-submenu>
            </el-submenu>
            <!-- 轮播图 -->
            <router-link to="/main/lbt">
            <el-menu-item index="3-1"><i class="el-icon-picture-outline"></i>轮播图</el-menu-item>
            </router-link>
          </el-menu>
        </el-aside>
        <!-- 左例表结束 -->
        <!-- 身体主内容 -->
        <el-main>
          <router-view />
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  data(){
    return{
    name: this.$route.params.name,
  }
  },
  
  methods: {
    fanhui(){
      this.$router.push('/')
    }
  }
};
</script>

<style lang="less" scoped>
.el-header {
  background-color: #008357;
  color: #333;
  line-height: 60px;

}
.imglogo {
  position: absolute;
  width: 150px;
  margin-top: 10px;
  margin-left: 50px;
}
.el-aside {
  color: #333; 
  background-color: #eee;
}
@media screen and ( max-width: 767px ) {
      .el-aside {
  color: #333; 
  width: 80px;
  background-color: #eee;
}
  }

</style>
